Skip to content

A Pull requests page: every open pull request, grouped by whose turn it is - #544

Merged
nambok merged 8 commits into
mainfrom
prs-view
Dec 5, 2026
Merged

nambok merged 8 commits into
mainfrom
prs-view

Conversation

@nambok

@nambok nambok commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A new top-level page, Pull requests (/prs), lists every open pull request in the team's installed repos, people's and CoderHelm's, grouped by whose turn it is: you, CoderHelm, a person, machines, done. Each row shows the one state the server decided and a sentence saying what the pull request needs next, from whom, and which rule asks for it (repo rule, CODEOWNERS, required check). CoderHelm sits in the same rows as people, with its own hexagon face, an AI label and the person it works for ("for @octocat").

It reads GET /api/prs and GET /api/prs/detail from the platform change that adds them (CoderHelm/coderhelm-platform, the pull requests API). On a backend without them (a 404, before an install updates) the page says the list arrives with the next update and points to the Reviewer, and it stops asking.

Changes

  • Page app/prs/page.tsx: the scope trail (All orgs, then the org, then the repo) is the address (?org=&repo=); each step is a bordered button that opens the choices at its level. Saved views (My turn, CoderHelm working, Needs decision, Ready, Stale) and a strip of counts per turn, each a filter sent to the server. On a phone the saved views are one scrolling row with a fade and a chevron at the edge while more is off screen; wider, they and the turn strip wrap, so every label is whole from 1024 to 1440. Search with /. Groups by turn, with each group's count and oldest wait, and Done folded.
  • Rows: the state with its own shape and words, repo#number, the title, the needs sentence right under it (never cut: it wraps, and the title gives way on a phone), then (from sm: up) the author or CoderHelm with "for @person", the last action, checks, approvals, CoderHelm's review, size, age and the modifiers (stale, stacked, large, agent-authored), with Next and the wait on the right and the people as at most two faces (one initial each) and "+n". On a phone a row is the state and where, the title on one line, and the whole sentence.
  • Detail app/prs/detail.tsx: beside the list from 1440px, over it below that (full screen on a phone). The needs sentence large, Next with the rule and since when, links to GitHub, CoderHelm's run and its review; the path to merge as a checklist (each mark has a shape and spoken words); the wait ledger as one bar and the same totals in words; the timeline with All / People / CoderHelm / Checks, CoderHelm's runs folded into blocks (the running one open); links to other pull requests with their state; the people and whose turn it is. It is read again every 15 s while the tab is visible.
  • Keyboard and screen readers: j/k (and the arrows on a row) move, Enter opens, Esc closes and returns focus to the row, / searches. Every row is named by its sentence ("acme/web 212, Round cart totals per currency. CoderHelm working. Checks fail on lint: CoderHelm is fixing them, round 2. Next: CoderHelm, waiting 4 min. Written by CoderHelm for @theo."), carries aria-posinset/aria-setsize, and the overlay traps focus. Changes between reads are said once in a polite live region ("1 pull request changed: 1 now needs you."), never row by row.
  • Long lists: a group of 60 rows or more draws only the rows near the screen (components/list/windowed.ts, window scroll, measured row heights); the keyboard reaches rows that weren't drawn.
  • Polling: every 30 s only while the tab is visible, and at once when it comes back. Sources the server couldn't read (GitHub's hourly budget, a failed reconcile) are named above the list, which still shows.
  • Shared list, extended: StatusLook.shape and ShapeIcon in list/status.tsx (statuses that read apart without colour); ListRow takes rowProps/rowRef, an eyebrow line, oneLineTitle, metaOnPhone and chipsOnPhone; List takes listProps/listRef; AvatarGroup and CoderHelmAvatar in support.tsx, with AvatarStack now built on AvatarGroup.
  • Nav and routes: "Pull requests" after Runs (need: "view"), its icon, and its routes.ts entry. Its section key is prs, the place main's phone bar (Inbox, Runs, PRs, Chat) keeps for it, so on a phone it fills that place with /prs. With Inbox and Pull requests both in the menu, a window 820px tall or less takes the last of the air out of the menu's rows, so the whole menu still fits 1280x800.
  • History reading: backfill from GET /api/prs shows quietly under the sync time while an organization's closed and merged pull requests are still being read ("Reading history: 9 of 14 months", with the pause and its reason when there is one), each repo's count behind a disclosure; nothing when it is done or absent.
  • Docs: docs/content/docs/getting-started/pull-requests.mdx (listed in Getting started, recorded in published-pages.json) covers the list's coverage, turn groups, every state with its sentence and rule, CoderHelm on a row, saved views, the detail, the keyboard, history reading and the phone, with these screenshots in docs/public/images/pull-requests/. api.ts types and calls for both endpoints.

Verification

  • npm run lint (ui-lint, no-hosted-links, fixture words), npm run typecheck, npm run check:openapi; docs: npm run test:unit, npm run build, npm run typecheck, check:links and check:output.
  • e2e/prs.spec.ts (new, 20 tests, history reading included, all mocked with invented data): turn groups and needs sentences, the columns, CoderHelm's face and AI label with "for @person", Unknown shown; shapes per state and the sentence names; the detail's checklist, ledger and folded runs, and Esc returning focus; the split view and j carrying it; saved views and turn filters in the address and the request; the scope trail; the keyboard; 500 rows windowed; polling only while visible; the change announcement; empty My turn, empty filter, a failed read with retry, the 404 fallback, a held source, a pull request that isn't the team's; a 375px phone (the needs sentence never cut, the title cut instead, no saved-view chip clipped without the scroll cue, full-screen detail, 44px targets, no sideways scroll), the turn strip's labels whole at 1024, 1280 and 1440, and the needs sentence placed between the title and the metadata.
  • no-sideways-scroll, no-mid-word-breaks and readable-text for /prs (the wide data answers both new GETs, with the detail open), shell-menu, shell-nav, phone-nav, phone-inbox, audit-alerts and the support specs: passing; CI's four end-to-end shards pass on the head.
  • Screenshots (invented data), 1440 and 375 wide:
Org scope (1440) A pull request open beside the list (1440)
Org scope, grouped by turn Detail beside the list
Repo scope, acme/web (1440) Phone list (375) Phone detail (375)
Repo scope Phone list Phone detail

The images live on the prs-view-shots branch only, not in this change.

…it is

The new top-level page (/prs) lists every open pull request in the team's
installed repos, people's and CoderHelm's, grouped by who has the next move
(you, CoderHelm, a person, machines, done). Each row says the one state the
server decided and the sentence of what it needs and from whom, with the
rule it comes from. CoderHelm shows with its own hexagon face, an AI label
and the person it works for.

The detail opens beside the list on a wide screen and over it otherwise
(full screen on a phone): the path to merge, the wait ledger and the
timeline with CoderHelm's runs folded. Saved views, the scope trail
(org, then repo) and the filters live in the address. j and k move, Enter
opens, Esc closes, / searches. Long lists draw only the rows near the
screen, the list is read again only while the tab is visible, and a
backend without the endpoint gets a plain note instead of an error.

The shared list grows what the page needed: shapes for statuses (never
colour alone), row attributes and an eyebrow line on ListRow, a windowed
list hook, and a generic AvatarGroup that AvatarStack now uses.
coderhelm[bot]

This comment was marked as outdated.

…pe switcher

- The needs sentence sits right under the title, above the metadata, and
  is never cut: on a phone it wraps and the title gives way instead.
- The turn strip wraps its buttons, so every label is whole from 1024 to
  1440 wide.
- On a phone the saved views are one scrolling row with a fade and a
  chevron at the edge while more is off screen.
- Each step of the org and repo trail is a bordered button that opens the
  choices at its level; the repo filter in the toolbar it duplicated is
  gone.
- Stacked faces show one initial each, two at most, then "+n".
The phone navigation keeps "pull-requests" as the second place in its
bottom bar; the section now uses that key, so the page takes it there
when both are in.
coderhelm[bot]

This comment was marked as outdated.

@coderhelm
coderhelm Bot dismissed their stale review December 5, 2026 17:15

Superseded by CoderHelm's latest review

- GET /api/prs's backfill shows quietly under the sync time while an
  organization's closed and merged pull requests are still being read:
  "Reading history: 9 of 14 months", with the pause and its reason when
  there is one, and each repo's count behind a disclosure. Nothing shows
  when it is done or absent. The wide data answers it, and the spec checks
  both.
- docs: getting-started/pull-requests describes the list (coverage, turn
  groups, every state with its sentence and the rule behind it, CoderHelm on
  a row, saved views, the detail, the keyboard, history reading, the phone)
  with screenshots made from invented data.
coderhelm[bot]

This comment was marked as outdated.

@coderhelm
coderhelm Bot dismissed their stale review December 5, 2026 18:19

Superseded by CoderHelm's latest review

@coderhelm

coderhelm Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Auto-merge
Merged by hand. Nothing left to do.
Commit into main. Merges on its own once every item is done.

coderhelm[bot]

This comment was marked as outdated.

…in the phone bar

The merge of main into this branch replaced the app shell
(components/client-shell.tsx) with a different file that began with
prose, so the dashboard no longer type-checked. The shell is main's again
with this branch's two lines: the Pull requests icon in the icons import
and in NAV_ICONS. Every other file of that merge matches a clean merge of
main.

With the phone's bottom bar from main, Pull requests now takes the place
the bar keeps for it, as "PRs", and Security moves into the Menu sheet.
The phone navigation spec says so.
With Pull requests in the menu, "Pull request" matched both the menu entry
and the alert's link; the spec now asks for the exact name.
coderhelm[bot]

This comment was marked as outdated.

@coderhelm
coderhelm Bot dismissed their stale review December 5, 2026 20:16

Superseded by CoderHelm's latest review

Main's phone bar keeps a "prs" place (Inbox, Runs, PRs, Chat); the Pull
requests section now uses that key, so it fills the place with /prs, and
the bar is main's as it is. The shell, nav and routes are main's plus this
branch's additions: the Pull requests icon, its section after Runs and its
route. With Inbox and Pull requests both in the menu, a short window (820px
or less) takes the last of the air out of the menu's rows, so the whole
menu still fits 1280x800.

@coderhelm coderhelm Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved 364160c (merged)

}

/** "1 d 4 h", "47 min": a ledger total. */
export function longSecs(secs: number): string {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Blocking (correctness): Near-identical helpers added together (scope)

dashboard/src/app/prs/model.ts adds longSecs next to shortSecs, added in the same change. Keep one helper with the shared logic (a parameter for what differs) and call it from both places. If the ticket truly needs it, say why on a line Wider than the ticket: dashboard/src/app/prs/model.ts: <why>.

@nambok
nambok merged commit 32eb482 into main Dec 5, 2026
30 checks passed
@nambok
nambok deleted the prs-view branch December 5, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ch-review CoderHelm reviews this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant